package wli.web.util;

import java.util.*;

public class SystemTime {    

    public static String getLocalDate() {
	Locale lc   = Locale.getDefault();
	TimeZone tz = TimeZone.getDefault();
	Calendar c  = Calendar.getInstance(tz, lc);
	String temp = (c.get(Calendar.MONTH)+1)+"/"+c.get(Calendar.DATE)+"/"+c.get(Calendar.YEAR)+" ";
	return temp;
    }

    public static String getLocalTime() {
	Locale lc   = Locale.getDefault();
	TimeZone tz = TimeZone.getDefault();
	Calendar c  = Calendar.getInstance(tz, lc);
	String temp = c.get(Calendar.HOUR)+":"+c.get(Calendar.MINUTE)+":"+c.get(Calendar.SECOND)+"["+tz.getDisplayName()+"("+
	    lc.getISO3Country()+")]";
	return temp;
    }

    public static long getLocalTimeInMillis() {
	Locale lc   = Locale.getDefault();
	TimeZone tz = TimeZone.getDefault();
	Calendar c  = Calendar.getInstance(tz, lc);
	return c.getTimeInMillis();
    }

    public static String getLocalDateAndTime() {
	return getLocalDate()+" "+getLocalTime();
    }
}
